﻿var VENDERDIALOG;
/*封装统一的弹出层*/
function venderDialog(content) {
    var callback = arguments[1] ? arguments[1] : null;
    var html = '<div class="dialog-body">'
        + '<div class=dialog-content>'
        + content
        + '</div>'
        + '<div class="dialog-footer" onclick="closeDialog(' + callback + ');">'
        + '<a href="javascript:;">确定</a>'
        + '</div>'
        + '</div>'
    VENDERDIALOG = dialog({
        id: "venderDialog",
        content: html,
        opacity: 0
    });
    VENDERDIALOG.showModal();
}
//关闭弹出层
function closeDialog(callback) {
    VENDERDIALOG.close().remove();
    if (null != callback) {
        callback();
    }
}